CREATE TABLE [dbo].[TMMENU]
(
[CO_SIST] [dbo].[TD_VC_008] NOT NULL,
[CO_MODU] [dbo].[TD_VC_008] NOT NULL,
[CO_MENU] [dbo].[TD_VC_020] NOT NULL,
[TI_MENU] [dbo].[TD_VC_001] NOT NULL,
[NU_ORDE] [dbo].[TD_SI_001] NULL CONSTRAINT [DF__TMMENU__NU_ORDE__0E6E26BF] DEFAULT ((0)),
[NU_SECU_MODU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TMMENU__NU_SECU___0F624AF8] DEFAULT ((0)),
[ST_ACCE_TRAB] [dbo].[TD_VC_003] NULL,
[NO_MENU] [dbo].[TD_VC_050] NOT NULL,
[DE_MENU] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TMMENU__CO_USUA___10566F31] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TMMENU__FE_USUA___114A936A] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TMMENU__CO_USUA___123EB7A3] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TMMENU__FE_USUA___1332DBDC] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMMENU] ADD CONSTRAINT [PK__TMMENU__666C31FC0E8E2250] PRIMARY KEY CLUSTERED  ([CO_SIST], [CO_MODU], [CO_MENU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMMENU] ADD CONSTRAINT [FK__TMMENU__3E082B48] FOREIGN KEY ([CO_SIST], [CO_MODU]) REFERENCES [dbo].[TMMODU_SIST] ([CO_SIST], [CO_MODU])
GO
GRANT SELECT ON  [dbo].[TMMENU] TO [public]
GRANT INSERT ON  [dbo].[TMMENU] TO [public]
GRANT DELETE ON  [dbo].[TMMENU] TO [public]
GRANT UPDATE ON  [dbo].[TMMENU] TO [public]
GO
